package queue;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;

public class Test {
    public static void main(String[] args) {
        /*Queue<Integer> q=new LinkedList<>();
        q.offer(1);
        q.offer(2);
        q.offer(3);
        q.offer(4);
        System.out.println(q.size());
        System.out.println(q.poll());
        System.out.println(q.peek());
        while(!q.isEmpty()){
            System.out.print(q.poll()+" ");
        }*/


        /*Queue queue=new Queue();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);
        System.out.println(queue.poll());
        System.out.println(queue.isEmpty());
        System.out.println(queue.size());
        System.out.println("===============");
        LinkedList<Integer> stack=new LinkedList<>();
        stack.push(100);
        System.out.println(stack.peek());*/


        Deque<Integer> deque=new ArrayDeque<>();
        deque.offerFirst(1);
        deque.offerLast(10);
        System.out.println(deque);
        Deque<Integer> deque2=new LinkedList<>();
        deque2.addAll(deque);
        deque2.offerLast(1000);
        System.out.println(deque2);
    }
}
